package com.bbzn.user.client.dao.user;

import com.bbzn.user.client.dataobject.User;
import java.util.Date;
import java.util.List;
import com.bbzn.user.client.dto.user.UserInfoDTO;import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> findByAll(User user);

    int updateBatch(List<User> list);

    int updateBatchSelective(List<User> list);

    int batchInsert(@Param("list") List<User> list);

    int insertOrUpdate(User record);

    int insertOrUpdateSelective(User record);

    int insert(User record);

    int insertBaseSelective(User record);

    int selectCountBySelective(User record);

    int selectSubOneCount(@Param("pid") Long pid);

    List<UserInfoDTO> selectByPid(@Param("pid")Long pid);

    List<Long> selectSubIdByPid(@Param("pid")Long pid);

    /**
     * 根据子id查询所有的父id
     * @param id
     * @return
     */
    List<Long> selectPidById(@Param("id") Long id);

    /**
     * 根据userID批量查询
     *
     * @param ids
     * @return
     */
    List<User> selectBatchIds(@Param("list") List<Long> ids);

    User selectByPhone(@Param("phone") String phone);
}